package org.aplombh.java.interview.test._231029;

import java.util.Scanner;

public class _3_进制转换 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String st = in.next();
        System.out.println(Integer.parseInt(st.substring(2),16));
    }
}
